<script>

var Car = (function(){
    var Car = function(model,year,miles){
        this.model = model
        this.year = year
        this.miles = miles
    }
    return function(model,year,miles){
        return new Car(model,year,miles)
    }
})()
var tom = Car('tom',111,222)


function Person(name,age){
    var person = {
        name,
        age
    }
    return person
}

var jerry = Person('jerry',15)
console.log(jerry)
</script>